<%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="ww" uri="webwork" %>

<ww:bean name="'com.css.apps.base.dict.service.DictMan'" id="dictID" />

<form class="form-horizontal table-form" name="zsjOrgForm" id="zsjOrgForm" method="post" action="dirZsjOrg.action" onsubmit="return $action.query(this)">
	<div class="table-header">
		<div class="table-search">					    
			<ul>
				<li>待同步单位列表（<ww:if test="orgList != null"><ww:property value="orgList.size()"/></ww:if><ww:else>0</ww:else>条）
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					单位层级：<input class="input-small" type="text" id="orgLevel" name="orgLevel" maxlength="50"  placeholder="输入单位层级" value="<ww:property value='orgLevel'/>"></li>
				<li>同步状态：<ww:select attributes="class='input-small'" name="'syncFlag'" id="syncFlag" value="syncFlag"  list="#dictID.getDictListQuery('sync_task_type')" listKey="code" listValue="name"></ww:select> </li>
				<li>
					<ww:button css="btn btn-sm btn-primary" caption="查询" funcode="acl_zsjuserbase/dirZsjUserBase" type="submit"></ww:button>
				</li>
			</ul>
		</div>
		<div class="table-btn">
			<div class="btn-group">
				<ww:link css="btn btn-default btn-sm" caption="<i class='fa fa-hand-o-up'></i> 同步选中" onclick="$action.execBatch(this,{url:'syncZsjOrg.action',title:'确认要进行此操作?'});"></ww:link>
			</div>
			<div class="btn-group">
				<ww:link css="btn btn-default btn-sm" caption="<i class='fa fa-repeat'></i> 全部同步" onclick="$action.exec(this,{url:'syncZsjOrg.action?flag=all&orgLevel=%{orgLevel}&&syncFlag=%{syncFlag}',title:'确认要进行此操作?'});"></ww:link>
			</div>
		</div>
	</div>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th width="25px"></th>
	     	 	<th width="180px">单位编码</th>
	     	 	<th>单位名称</th>
	     	 	<th width="180px">上级单位编码</th>
				<th width="40px">单位层级</th>
	     	 	<th width="130px">修改时间</th>
	     	 	<th width="60px">同步状态</th>
			</tr>
		</thead>
		<tbody>
		  <ww:iterator value="orgList" id="data" status="data">
			<tr>
				<td class="text-center"><input type="checkbox" name="ids" value="<ww:property value="id" />"/></td>
					<td><ww:property value="orgCode"/></td>
					<td><ww:property value="orgName"/></td>
					<td><ww:property value="orgParentCode"/></td>
					<td class="text-center"><ww:property value="orgLevel"/></td>
					<td class="text-center"><ww:property value="new java.text.SimpleDateFormat('yy/MM/dd HH:mm:ss').format(createDate)"/></td>
					<td class="text-center"><ww:property value="#dictID.getDictType('sync_task_type',sysSource).name" /></td>
			</tr>
			</ww:iterator>
		</tbody>
	</table>
</form>